<?php
	class Backend extends MY_Controller {
		function Backend(){
			parent::__construct();
			@session_start();
			$this->mod_ad->is_logged_in();
			$_SESSION['redirect'] = $this->uri->uri_string();
		}
		
		function index(){
			$data['title']			= "Trang quản trị HBAMEDIC";
			$data['content_admin']  = "back_end/content_backend";
			$this->db->order_by('parent_id','asc');
			$data['category_admin'] = $this->db->get('admin_menu')->result_array();
			
			$this->db->order_by('parent_id','asc');
			//lay ra cac danh muc cap 1
			$data['category_admin_1'] = $this->db->get_where('admin_menu',array('level' => 1))->result_array();
			//lay ra cac danh muc cap 2
			$data['category_admin_2'] = $this->db->get('admin_menu',array('level' => 2))->result_array();
			
			$uri_value = $this->uri->segment(2);
			$data['category_admin_active'] = 0;
				
			$this->load->view('back_end/template_backend', $data);	
		}
		
	}
?>